<?php
/**
 * Copyright (c) 2006, PORTALIER Julien
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @package      FeatherPHP
 * @subpackage   Core
 * @copyright    Copyright (c) 2006, Julien PORTALIER
 * @link         http://feather.portalier.com
 * @license      http://www.opensource.org/licenses/mit-license.php The MIT License
 */

abstract class Base
{
	private static $_instance;
	
	protected function __construct()
	{
		
	}
	
	function instance($c=null)
	{
		if (is_null(self::$_instance))
		{
			if (is_null($c)) $c = __CLASS__;
			self::$_instance = new $c;
		}
		return self::$_instance;
	}
	
	function __clone()
	{
		trigger_error(_("Cloning this object is forbidden."), E_USER_ERROR);
	}
}
?>